package com.hyst.service;

import java.text.ParseException;

import com.github.pagehelper.Page;
import com.hyst.domain.PurchaseCourse;
import com.hyst.domain.PurchaseCourseView;
import com.hyst.domain.Student;

/**
 * @Description:购买课程记录表Service
 * @author：dy @Date：2018年09月11日
 */

public interface PurchaseCourseService {

	/**
	 * @Description: 根据条件列表查询
	 * @param purchaseCourse
	 * @return Page<PurchaseCourse>
	 */
	Page<PurchaseCourse> list(PurchaseCourse purchaseCourse);

	/**
	 * @Description:添加单条记录，空属性值会采用数据库默认值插入
	 * @param purchaseCourse
	 * @return PurchaseCourse
	 */
	PurchaseCourse insert(PurchaseCourse purchaseCourse);

	/**
	 * @Description:根据主键获取
	 * @param uniqueid
	 * @return PurchaseCourse
	 */
	PurchaseCourse getByPriKey(String uniqueid);

	/**
	 * @Description:根据对象主键更新对象不为空字段
	 * @param purchaseCourse
	 * @return PurchaseCourse
	 */
	PurchaseCourse updateSelective(PurchaseCourse purchaseCourse);

	/**
	 * @Description:根据对象主键更新对象不为空字段
	 * @param purchaseCourse
	 * @return PurchaseCourse
	 */
	PurchaseCourse update(PurchaseCourse purchaseCourse);

	/**
	 * @Description:根据主键获取
	 * @param uniqueid
	 * @return PurchaseCourse
	 */
	PurchaseCourse delete(String uniqueid);

	/**
	 * @Description:
	 * @return Page<Student>
	 */
	Page<Student> getStudents();

	/**
	 * @Description:
	 * @param uniqueid
	 * @return PurchaseCourse
	 */
	PurchaseCourse getView(String uniqueid);

	/**
	 * @Description: 增加上课时间
	 * @param purchaseCourse
	 * @return PurchaseCourse
	 * @throws ParseException
	 */
	PurchaseCourse addTimes(PurchaseCourse purchaseCourse) throws ParseException, CloneNotSupportedException;

	/**
	* @Description: 
	* @param view
	* @return	Page<PurchaseCourse>
	*/ 
	Page<PurchaseCourseView> getByStudent(PurchaseCourseView view);

	/**
	* @Description: 还原课程
	* @param purchaseCourseId
	* @return	Page<Object>
	*/ 
	int reduction(String purchaseCourseId);

	void updateClassTime(final PurchaseCourse purchaseCourse) throws Exception;
}
